 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
|
Declaration
of pointers to structures:
|
|
 |
|
|
|
|
|
|
n |
This defines John as a structure and pJohn as a
|
|
|
pointer to a
structure.
|
|
|
|
pJohn variable
initialisation:
|
|
 |
|
|
|
|
|
|
n |
pJohn can be made to point to John:
|
|
|
|
pJohn
= &John;
|
|
|
|
n |
new can be used to
allocation memory for pJohn:
|
|
|
int
*pJohn = new student;
|
|